<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"></meta>
    <title>menu</title>
</head>
<body>
<menu-sidebar th:fragment="sidebar">
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <!-- Brand Logo -->
        <a href="index" class="brand-link">
            <img src="dist/img/CoolCloudLogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
                 style="opacity: .8">
            <span class="brand-text font-weight-light">Cool Cloud</span>
        </a>

        <!-- Sidebar -->
        <div class="sidebar">
            <!-- Sidebar user panel (optional) -->
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                <div class="image">
                    <img th:src="${session.loginUser.imagePath}" class="img-circle elevation-2" alt="User Image">
                </div>
                <div class="info">
                    <a href="#" class="d-block">Welcome! [[${session.loginUser.userName}]]</a>
                </div>
            </div>

            <!-- SidebarSearch Form -->
            <div class="form-inline">
                <div class="input-group" data-widget="sidebar-search">
                    <input class="form-control form-control-sidebar searchinput" type="search" placeholder="Search"
                           aria-label="Search">
                    <div class="input-group-append">
                        <button class="btn btn-sidebar searchbtn">
                            <i class="fas fa-search fa-fw"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 侧边菜单 -->
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <!-- Add icons to the links using the .nav-icon class
                         with font-awesome or any other icon font library -->
                    <li class="nav-item">
                        <a href="index" class="nav-link" th:classappend="${session.page == 'index'} ? 'active' : '' ">
                            <i class="nav-icon fas fa-tachometer-alt"></i>
                            <p>
                                Home Page
                                <span class="right badge badge-danger">New</span>
                            </p>
                        </a>
                    </li>
                    <li class="nav-item"
                        th:classappend="${session.page == 'file-all' || session.page == 'file-video' || session.page == 'file-doc' || session.page == 'file-music' || session.page == 'file-image' || session.page == 'file-video' || session.page == 'file-other'} ? 'menu-open' : '' ">
                        <a href="#" class="nav-link">
                            <i class="nav-icon fas fa-th "></i>
                            <p>
                                我的文件
                                <i class="right fas fa-angle-left"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview">
                            <li class="nav-item">
                                <a href="file-all" class="nav-link"
                                   th:classappend="${session.page == 'file-all'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>文件总览</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="file-video" class="nav-link"
                                   th:classappend="${session.page == 'file-video'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>视频</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="file-image" class="nav-link"
                                   th:classappend="${session.page == 'file-image'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>图片</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="file-music" class="nav-link"
                                   th:classappend="${session.page == 'file-music'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>音乐</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="file-doc" class="nav-link"
                                   th:classappend="${session.page == 'file-doc'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>文档</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="file-other" class="nav-link"
                                   th:classappend="${session.page == 'file-other'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>其他</p>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li th:if="${session.loginUser.role==0}" class="nav-item"
                        th:classappend="${session.page == 'manage-user' || session.page == 'manage-storage'} ? 'menu-open' : '' ">
                        <a href="#" class="nav-link">
                            <i class="nav-icon fas fa-copy"></i>
                            <p>
                                管理面板
                                <i class="fas fa-angle-left right"></i>
                                <span class="badge badge-info right">admin</span>
                            </p>
                        </a>
                        <ul class="nav nav-treeview">
                            <li class="nav-item">
                                <a href="manage-user" class="nav-link"
                                   th:classappend="${session.page == 'manage-user'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>用户管理</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="manage-storage" class="nav-link"
                                   th:classappend="${session.page == 'manage-storage'} ? 'active' : '' ">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>存储策略管理</p>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="myshare" class="nav-link"
                           th:classappend="${session.page == 'myshare'} ? 'active' : '' ">
                            <i class="nav-icon fas fa-share-alt"></i>
                            <p>
                                我的分享
                            </p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="upload" class="nav-link" th:classappend="${session.page == 'upload'} ? 'active' : '' ">
                            <i class="nav-icon fas fa-cloud-upload-alt"></i>
                            <p>
                                文件上传
                            </p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="backgroundwork" class="nav-link"
                           th:classappend="${session.page == 'backgroundwork'} ? 'active' : '' ">
                            <i class="nav-icon fas fa-cloud-download-alt"></i>
                            <p>
                                离线下载任务
                            </p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="slider-picture" class="nav-link"
                           th:classappend="${session.page == 'slider-picture'} ? 'active' : '' ">
                            <i class="nav-icon fas fa-images"></i>
                            <p>
                                图片滚动
                            </p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="wallet" class="nav-link" th:classappend="${session.page == 'wallet'} ? 'active' : '' ">
                            <i class="nav-icon fas fa-yen-sign"></i>
                            <p>
                                我的钱包
                            </p>
                        </a>
                    </li>
                </ul>
            </nav>
            <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
    </aside>
</menu-sidebar>
</body>
</html>